package com.acegear.horizon.domain.repository.jpa;

import com.acegear.horizon.domain.models.jpa.EventOrder;

import org.springframework.data.repository.CrudRepository;

import java.util.List;
import java.util.Optional;

/**
 * Created by mercury on 2017/1/15.
 */
public interface EventOrderRepository extends CrudRepository<EventOrder, Long> {
    List<EventOrder> findByEventId(Long eventId);

    Optional<EventOrder> findByOrderId(String orderId);

    Integer countByUserId(Long userId);
}
